/* 基础重置 */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: system-ui, -apple-system, sans-serif;
	line-height: 1.6;
	background-color: #f5f5f5;
	color: #333;
	height: 100vh;
}

/* 导航栏样式 */
.navbar {
	background-color: #2c3e50;
	color: white;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-logo {
	display: flex;
	align-items: center;
}

.nav-logo img {
	height: 40px;
	margin-right: 10px;
}

.nav-links {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-links li {
	margin-left: 20px;
}

.nav-links a {
	color: white;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s;
}

.nav-links a:hover {
	color: #3498db;
}

.nav-links i {
	margin-right: 0.5rem;
}

/* 主布局 */
.app-layout {
	display: flex;
	height: calc(100vh - 60px);
	/* 减去导航栏高度 */
}

/* 侧边栏 */
.sidebar {
	width: 200px;
	background-color: #f4f4f9;
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.logo-section {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.logo-section img {
	width: 120px;
	height: 120px;
	object-fit: contain;
}

.logo-text {
	font-size: 18px;
	font-weight: bold;
	margin-top: 10px;
}

.new-chat-button {
	width: 100%;
	margin-top: 20px;
	padding: 10px;
	background-color: #409eff;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.new-chat-button:hover {
	background-color: #66b1ff;
}

/* 主内容区 */
.main-content {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
}

/* 聊天界面样式 */
.chat-container {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.message-list {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background-color: #fff;
	margin-bottom: 10px;
	display: flex;
	flex-direction: column;
}

.message {
	margin-bottom: 10px;
	padding: 10px;
	border-radius: 4px;
	display: flex;
	align-items: flex-start;
	/* 改为顶部对齐 */
	max-width: 80%;
}

.user-message {
	background-color: #e1f5fe;
	align-self: flex-end;
	flex-direction: row;
	/* 正常排列 */
}

.bot-message {
  max-width: 100%;
  background-color: #f1f8e9;
  align-self: flex-start;
}

.message-icon {
	font-size: 1.2em;
	flex-shrink: 0;
	/* 防止图标被压缩 */
}

/* 用户消息图标在右侧 */
.user-message .message-icon {
	margin-left: 10px;
	margin-right: 0;
}

/* 机器人消息图标在左侧 */
.bot-message .message-icon {
	margin-right: 10px;
	margin-left: 0;
}

.message-content {
	word-break: break-word;
	/* 确保长单词也能换行 */
}

.input-container {
	display: flex;
}

.input-container input {
	flex: 1;
	margin-right: 10px;
	padding: 10px;
	border: 1px solid #dcdfe6;
	border-radius: 4px;
}

.input-container button {
	padding: 0 20px;
	background-color: #409eff;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.input-container button:hover {
	background-color: #66b1ff;
}

.input-container button:disabled {
	background-color: #a0cfff;
	cursor: not-allowed;
}

/* 加载动画 */
.loading-dots {
	padding-left: 5px;
}

.dot {
	display: inline-block;
	margin-left: 5px;
	width: 8px;
	height: 8px;
	background-color: #000000;
	border-radius: 50%;
	animation: pulse 1.2s infinite ease-in-out both;
}

.dot:nth-child(2) {
	animation-delay: -0.6s;
}

@keyframes pulse {

	0%,
	100% {
		transform: scale(0.6);
		opacity: 0.4;
	}

	50% {
		transform: scale(1);
		opacity: 1;
	}
}

/* 预约管理页面特定样式 */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

h1 {
	text-align: center;
	margin-bottom: 2rem;
	color: #2c3e50;
}

.appointment-actions {
	margin-bottom: 2rem;
	text-align: right;
}

.new-btn {
	background-color: #3498db;
	color: white;
	padding: 0.8rem 1.5rem;
	font-size: 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.new-btn:hover {
	background-color: #2980b9;
}

.appointment-list {
	background-color: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.appointment-list h2 {
	margin-bottom: 1.5rem;
	color: #2c3e50;
	border-bottom: 1px solid #eee;
	padding-bottom: 0.5rem;
}

.filter-controls {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.filter-controls select,
.filter-controls input {
	padding: 0.8rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.filter-controls input {
	width: 300px;
}

.appointment-form {
	background-color: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	margin-bottom: 2rem;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: bold;
}

.submit-btn {
	background-color: #3498db;
	color: white;
	border: none;
	padding: 0.8rem 1.5rem;
	font-size: 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.submit-btn:hover {
	background-color: #2980b9;
}

/* 模态框样式 */
.modal {
	display: none;
	position: fixed;
	z-index: 100;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
	background-color: white;
	margin: 5% auto;
	padding: 2rem;
	width: 80%;
	max-width: 600px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover {
	color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.navbar {
		flex-direction: column;
		padding: 1rem;
	}

	.nav-links {
		margin-top: 1rem;
	}

	.nav-links li {
		margin: 0 0.5rem;
	}

	.app-layout {
		flex-direction: column;
	}

	.sidebar {
		width: 100%;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 10px;
	}

	.logo-section {
		flex-direction: row;
		align-items: center;
	}

	.logo-text {
		font-size: 20px;
	}

	.logo-section img {
		width: 40px;
		height: 40px;
	}

	.new-chat-button {
		margin-right: 30px;
		width: auto;
		margin-top: 5px;
	}

	.filter-controls {
		flex-direction: column;
		gap: 0.5rem;
	}

	.filter-controls input {
		width: 100%;
	}
}


/* appointments */
/* 新增预约卡片样式 */
.appointment-card {
	border: 1px solid #eee;
	border-radius: 6px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	transition: box-shadow 0.3s;
}

.appointment-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.appointment-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.appointment-name {
	font-weight: bold;
	font-size: 1.2rem;
}

.appointment-status {
	padding: 0.3rem 0.8rem;
	border-radius: 4px;
	font-size: 0.9rem;
}

.status-pending {
	background-color: #f39c12;
	color: white;
}

.status-confirmed {
	background-color: #2ecc71;
	color: white;
}

.status-completed {
	background-color: #3498db;
	color: white;
}

.status-cancelled {
	background-color: #e74c3c;
	color: white;
}

.appointment-details {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.appointment-detail {
	font-size: 0.9rem;
}

.appointment-detail strong {
	display: block;
	margin-bottom: 0.3rem;
	color: #7f8c8d;
}

.appointment-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
}

.action-btn {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: opacity 0.3s;
}

.action-btn:hover {
	opacity: 0.8;
}

.edit-btn {
	background-color: #3498db;
	color: white;
}

.cancel-btn {
	background-color: #e74c3c;
	color: white;
}

.no-appointments {
	text-align: center;
	color: #777;
	padding: 2rem;
}


/* 个人中心主内容区 */
.profile-container {
	flex: 1;
	padding: 30px;
	overflow-y: auto;
}

/* 个人信息卡片 */
.profile-card {
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 30px;
	margin-bottom: 30px;
}

.profile-header {
	display: flex;
	align-items: center;
	margin-bottom: 30px;
}

.profile-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	margin-right: 20px;
	border: 3px solid #3498db;
}

.profile-title {
	font-size: 24px;
	margin-bottom: 5px;
}

.profile-subtitle {
	color: #7f8c8d;
	font-size: 16px;
}

/* 信息表格 */
.profile-info {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.info-group {
	margin-bottom: 15px;
}

.info-label {
	font-weight: bold;
	color: #7f8c8d;
	margin-bottom: 5px;
	display: block;
}

.info-value {
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

/* 操作按钮区 */
.profile-actions {
	margin-top: 30px;
	display: flex;
	gap: 15px;
}

.action-btn {
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 500;
	transition: all 0.3s;
}

.edit-btn {
	background-color: #3498db;
	color: white;
	border: none;
}

.edit-btn:hover {
	background-color: #2980b9;
}

.change-password-btn {
	background-color: white;
	color: #3498db;
	border: 1px solid #3498db;
}

.change-password-btn:hover {
	background-color: #f8f9fa;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.profile-header {
		flex-direction: column;
		text-align: center;
	}

	.profile-avatar {
		margin-right: 0;
		margin-bottom: 15px;
	}

	.profile-info {
		grid-template-columns: 1fr;
	}

	.profile-actions {
		flex-direction: column;
	}
}

/* 登录页面特定样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px); /* 减去导航栏高度 */
    padding: 2rem;
    background-color: #f5f5f5;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-logo img {
    width: 100px;
    height: auto;
}

.login-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    border-color: #3498db;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.login-btn:hover {
    background-color: #2980b9;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.login-footer a {
    color: #3498db;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
}

/* 注册页面特定样式 */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px); /* 减去导航栏高度 */
    padding: 2rem;
    background-color: #f5f5f5;
}

.register-card {
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.register-logo {
    margin-bottom: 1.5rem;
}

.register-logo img {
    width: 100px;
    height: auto;
}

.register-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.register-form .form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.register-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.register-form input, 
.register-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.register-form input:focus,
.register-form select:focus {
    border-color: #3498db;
    outline: none;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.register-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.register-btn:hover {
    background-color: #27ae60;
}

.register-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.register-footer a {
    color: #3498db;
    text-decoration: none;
}

.register-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .register-card {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .register-title {
        font-size: 1.3rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* 忘记密码页面特定样式 */
.forgot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px); /* 减去导航栏高度 */
    padding: 2rem;
    background-color: #f5f5f5;
}

.forgot-card {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.forgot-logo {
    margin-bottom: 1.5rem;
}

.forgot-logo img {
    width: 100px;
    height: auto;
}

.forgot-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.forgot-subtitle {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.forgot-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.forgot-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.forgot-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.forgot-form input:focus {
    border-color: #3498db;
    outline: none;
}

.reset-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 0.5rem;
}

.reset-btn:hover {
    background-color: #c0392b;
}

.forgot-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.forgot-footer a {
    color: #3498db;
    text-decoration: none;
}

.forgot-footer a:hover {
    text-decoration: underline;
}

/* 验证码输入组 */
.code-group {
    display: flex;
    gap: 0.8rem;
}

.code-input {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
}

.get-code-btn {
    padding: 0 1rem;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.get-code-btn:hover {
    background-color: #d35400;
}

.get-code-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .forgot-card {
        padding: 1.5rem;
    }
    
    .forgot-title {
        font-size: 1.3rem;
    }
    
    .code-group {
        flex-direction: column;
    }
    
    .get-code-btn {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 350px;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  padding: 8px 16px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-confirm {
  padding: 8px 16px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-confirm:hover {
  background-color: #d32f2f;
}